import request from '@/utils/request'

export function loadDataUrl() {
  return 'v1/roleMng/loadData'
}

export function findUserByRoleIdUrl() {
  return 'v1/roleMng/findUserByRoleId'
}

export function deleteRoleUser(data) {
  return request({
    url: 'v1/roleMng/deleteRoleUser',
    method: 'post',
    data
  })
}

export function viewMainData(data) {
  return request({
    url: 'v1/roleMng/toView',
    method: 'post',
    data
  })
}

export function addOrEdit(data) {
  return request({
    url: 'v1/roleMng/doSave',
    method: 'post',
    data
  })
}

export function del(data) {
  return request({
    url: 'v1/roleMng/doDelete',
    method: 'post',
    data
  })
}

export function savePriv(data) {
  return request({
    url: 'v1/roleMng/savePriv',
    method: 'post',
    data
  })
}

export function saveMenu(data) {
  return request({
    url: 'v1/roleMng/saveMenu',
    method: 'post',
    data
  })
}

export function saveOrg(data) {
  return request({
    url: 'v1/roleMng/saveOrg',
    method: 'post',
    data
  })
}

export function saveUser(data) {
  return request({
    url: 'v1/roleMng/saveUser',
    method: 'post',
    data
  })
}

export function saveAdminUser(data) {
  return request({
    url: 'v1/roleMng/saveAdminUser',
    method: 'post',
    data
  })
}
